<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" href="static/css/404.css" />
	<script src="static/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript">
	$(function() {
		var h = $(window).height();
		$('body').height(h);
		$('.mianBox').height(h);
		centerWindow(".tipInfo");
	});

	//2.将盒子方法放入这个方，方便法统一调用
	function centerWindow(a) {
		center(a);
		//自适应窗口
		$(window).bind('scroll resize',
				function() {
					center(a);
				});
	}

	//1.居中方法，传入需要剧中的标签
	function center(a) {
		var wWidth = $(window).width();
		var wHeight = $(window).height();
		var boxWidth = $(a).width();
		var boxHeight = $(a).height();
		var scrollTop = $(window).scrollTop();
		var scrollLeft = $(window).scrollLeft();
		var top = scrollTop + (wHeight - boxHeight) / 2;
		var left = scrollLeft + (wWidth - boxWidth) / 2;
		$(a).css({
			"top": top,
			"left": left
		});
	}
</script>
</head>
<body>
<div class="mianBox">
	<img src="static/images/404img/index.png" alt="" class="yun yun0" />
	<img src="static/images/404img/index1.png" alt="" class="yun yun1" />
	<img src="static/images/404img/index3.png" alt="" class="yun yun2" />
	<img src="static/images/404img/index4.png" alt="" class="bird" />
	<img src="static/images/404img/index5.png" alt="" class="san" />
	<form action="login" method="post" id="userform">
		<input type="hidden" name="username" value="${username}" id="user">
		
		<input type="hidden" name="password"  value="${password}" id="passwords"> 
	</form>
	<div class="tipInfo">
		<div class="in">
			<div class="textThis">
				<h2>注册成功</h2>
				<p><span>页面自动<a id="href" onclick="gopost()" target="_blank">跳转主页面</a></span><Br><Br><span>等待<b id="wait">10</b>秒</span></p>
				<script type="text/javascript">                            (function() {
						var wait = document.getElementById('wait'), href = document.getElementById('href').href;
						var interval = setInterval(function() {
							var time = --wait.innerHTML;
							if (time <= 0) {
								clearInterval(interval);
								gopost();
							}
							;
						}, 1000);
					})();
				
					function gopost(){
						var forms = $("#userform");
						forms.submit();
					}
				</script>
			</div>
		</div>
	</div>
</div>

</body>
</html>